#ifndef SHADER_H
#define SHADER_H
#include <list>
#include <string>
#include <iosfwd>
#include "globals.h"
#include "light_source.h"
#include "random.h"
#include "intersection.h"
namespace gemren
{
	class Scene;
	class shader
	{
	public:
		typedef embree::Vec2f coord2d;
		
		virtual void shade(random* ran, const scene* sc, intersection* i) const = 0;
		virtual bool set_param(std::istream& datastream){ return false; }
		virtual ~shader(){}
		static shader_ptr load_shader(const char filename[]){ return 0; }
	protected:
		coord2d get_texture_coord(const intersection* i) const;
		void get_abs_texcoord_base(const intersection* i, coord& right, coord& up) const;
	};
	//no shaders yet
}
#endif